﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace estudent
{
    // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
    // visit http://go.microsoft.com/?LinkId=9394801

    public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
            "IzjemaA",
            "IzbirniPredmetnik/Izbira/{id}/Shrani",
            new { controller = "IzbirniPredmetnik", action = "Shrani", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                "IzjemaB",
                "IzbirniPredmetnik/Izbira/{id}/dobiPredmeteOdModula",
                new { controller = "IzbirniPredmetnik", action = "dobiPredmeteOdModula", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                "IzjemaC", // Route name
                "VpisniList/Uredi/{id}/{idVpis}", // URL with parameters
                 new { controller = "VpisniList", action = "Uredi", id = UrlParameter.Optional, idVpis = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "IzjemaD", // Route name
                "BrisanjeRoka/Brisi/{id}/{datum}", // URL with parameters
                 new { controller = "BrisanjeRoka", action = "Brisi", id = UrlParameter.Optional, datum = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "IzjemaE", // Route name
                "VnosPrijavnica/Predmeti/{id}", // URL with parameters
                 new { controller = "VnosPrijavnica", action = "Predmeti", id = UrlParameter.Optional } // Parameter defaults
            );

            

            routes.MapRoute(
                "IzjemaG", // Route name
                "OdjavaIzpitaReferentka/Roki/Odjavi/{id}/{pouc}/{datum}", // URL with parameters
                 new { controller = "OdjavaIzpitaReferentka", action = "Odjavi", id = UrlParameter.Optional, pouc = UrlParameter.Optional, pred = UrlParameter.Optional, datum = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "IzjemaH", // Route name
                "Odjavi/{id}/{pouc}/{datum}", // URL with parameters
                 new { controller = "OdjavaIzpitaReferentka", action = "Odjavi", id = UrlParameter.Optional, pouc = UrlParameter.Optional, pred = UrlParameter.Optional, datum = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "IzjemaF", // Route name
                "OdjavaIzpitaReferentka/Roki/{id}", // URL with parameters
                 new { controller = "OdjavaIzpitaReferentka", action = "Roki", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "IzjemaK", // Route name
                "OsebniPodatki/Podatki/{id}", // URL with parameters
                 new { controller = "OsebniPodatki", action = "Podatki", id = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "IzjemaL", // Route name
                "SpreminjanjeRoka/Spremeni/{id}/{datum}", // URL with parameters
                 new { controller = "SpreminjanjeRoka", action = "Spremeni", id = UrlParameter.Optional, datum = UrlParameter.Optional } // Parameter defaults
            );

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Main", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

        }

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterRoutes(RouteTable.Routes);
        }
    }
}